//
//  SPMessageViewController.m
//  Sport
//
//  Created by Cass on 2017/11/25.
//  Copyright © 2017年 Cass. All rights reserved.
//

#import "SPMessageViewController.h"
#import "SPFriendsViewController.h"
#import "SPAddFriendsViewController.h"
@interface SPMessageViewController ()

@end

@implementation SPMessageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"消息";
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithImage:nil selectedImage:nil title:@"好友" target:self action:@selector(friends:)];
    self.navigationItem.rightBarButtonItem = [UIBarButtonItem itemWithImage:@"tab_icon_jia" selectedImage:@"tab_icon_jia" title:nil target:self action:@selector(addFriends:)];
}

- (void)friends:(UIBarButtonItem *)barButtonItem{
    SPFriendsViewController *friendsVC = [[UIStoryboard storyboardWithName:@"Message" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:NSStringFromClass([SPFriendsViewController class])];
    friendsVC.title = @"好友";
    [self.navigationController pushViewController:friendsVC animated:YES];
}
- (void)addFriends:(UIBarButtonItem *)barButtonItem{
    SPAddFriendsViewController *addVC = [[UIStoryboard storyboardWithName:@"Message" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:NSStringFromClass([SPAddFriendsViewController class])];
    addVC.title = @"添加好友";
    [self.navigationController pushViewController:addVC animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}


@end
